/*
package com.dawn.seckilldemo.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfigDemo {
    private static final String QUEUE1 = "queue_fanout01";
    private static final String QUEUE2 = "queue_fanout02";
    private static final String exchange = "fanoutExchange";

    private static final String QUEUE_Direct1 = "queue_direct01";
    private static final String QUEUE_Direct2 = "queue_direct02";
    private static final String exchange_Direct = "directExchange";
    private static final String rountingkey01 = "queue.red";
    private static final String rountingkey02 = "queue.green";

    @Bean
    public Queue queue(){
        return new Queue("queue",true);
    }

    @Bean
    public Queue queue1(){
        return new Queue(QUEUE1);
    }
    @Bean
    public Queue queue2(){
        return new Queue(QUEUE2);
    }

    @Bean
    public FanoutExchange exchange(){
        return new FanoutExchange(exchange);
    }

    @Bean
    public Binding binding01(){
        return BindingBuilder.bind(queue1()).to(exchange());
    }

    @Bean
    public Binding binding02(){
        return BindingBuilder.bind(queue2()).to(exchange());
    }

    //direct模式
    @Bean
    public Queue queue_direct(){
        return new Queue(QUEUE_Direct1);
    }

    @Bean
    public Queue queue_direct2(){
        return new Queue(QUEUE_Direct2);
    }

    @Bean
    public DirectExchange exchange_direct(){
        return new DirectExchange(exchange_Direct);
    }

    @Bean
    public Binding binding_direct1(){
        return BindingBuilder.bind(queue_direct()).to(exchange_direct()).with(rountingkey01);
    }

    @Bean
    public Binding binding_direct2(){
        return BindingBuilder.bind(queue_direct2()).to(exchange_direct()).with(rountingkey02);
    }
}
*/
